# NestJS

Rspack not only supports building frontend projects but also supports building Node.js App like NestJS.
Rspack provides NestJS [example](https://github.com/rspack-contrib/rstack-examples/tree/main/rspack/nestjs) for reference.

## Native node modules

When building Node.js applications with Rspack, you may encounter dependencies that include Node.js native addon dependencies (`.node` modules). Because `.node` modules cannot be packaged into JavaScript artifacts, special handling is usually required. node-loader can be used to handle addon packaging very well.

```js title="rspack.config.mjs"
export default {
  module: {
    rules: [
      {
        test: /\.node$/,
        use: [
          {
            loader: 'node-loader',
            options: {
              name: '[path][name].[ext]',
            },
          },
        ],
      },
    ],
  },
};
```
